//
//  ForgetPasswordViewController.m
//  AAIM
//
//  Created by 远的小布丁 on 2019/12/1.
//  Copyright © 2019 AAIM. All rights reserved.
//

#import "ForgetPasswordViewController.h"

@interface ForgetPasswordViewController ()
@property (nonatomic,strong) UILabel * tipLabel;
@property (nonatomic,strong) UIImageView * QRCodeImageView;
@end

@implementation ForgetPasswordViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.gk_navTitle = @"找回密码";
    
    [self.view addSubview:self.tipLabel];
    [self.view addSubview:self.QRCodeImageView];
    [_tipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view.mas_top).offset(77+kTopHeight);
        make.centerX.equalTo(self.view.mas_centerX);
        make.left.equalTo(self.view.mas_left).offset(SCALAE_WIDTH(34.f));
        make.right.equalTo(self.view.mas_right).offset(SCALAE_WIDTH(-34.f));
    }];
    
    [_QRCodeImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tipLabel.mas_bottom).offset(57.f);
        make.centerX.equalTo(self.view.mas_centerX);
        make.size.mas_equalTo(CGSizeMake(SCALAE_WIDTH(200.f), SCALAE_WIDTH(200.f)));
    }];
    // Do any additional setup after loading the view.
}

- (UILabel *)tipLabel{
    if (!_tipLabel) {
        _tipLabel = [[UILabel alloc]init];
        _tipLabel.text = [NSString stringWithFormat:@"添加客服微信%@，联系客服修改密码",kefuWechat];
        _tipLabel.numberOfLines = 0;
        _tipLabel.textAlignment = 1;
        _tipLabel.font = kMainFont(15);
        _tipLabel.textColor = KHEXCOLOR(@"#262B2F");
        
    }
    return _tipLabel;
}

- (UIImageView *)QRCodeImageView{
    if (!_QRCodeImageView) {
        _QRCodeImageView = [[UIImageView alloc]init];
        [_QRCodeImageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",userInfoImage,kefuQRCode]] placeholderImage:[UIImage imageNamed:@"bg_pyqtx"] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
        KWeakSelf;
        weakSelf.QRCodeImageView.image = image;
        }];
        [_QRCodeImageView setContentScaleFactor:[[UIScreen mainScreen] scale]];
        _QRCodeImageView.contentMode =  UIViewContentModeScaleAspectFill;
        
    }
    return _QRCodeImageView;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
